using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MeetingRoom.Data;
using MeetingRoom.Data.Implementation;
using MeetingRoom.Domain;
using MeetingRoom.Web.Presenter;
using MeetingRoom.Service;
using MeetingRoom.Service.Workflow;
using MeetingRoom.Service.Workflow.Implementation;
using MeetingRoom.Service.Implementation;

public partial class Apply : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        IWorkflow workflow = new SimpleWorkflow();
        AvailablityCheckingPhase availableChecking = new AvailablityCheckingPhase();
        availableChecking.GetMeetingRoomTypeImplementor = 
            new SimpleGetMeetingRoomTypes();
        availableChecking.GetSchedulesByMeetingRoomTypeImplementor = 
            new SimpleGetSchedulesByMeetingRoomType();
        workflow.AddPreCondition(availableChecking);
        
        AddSchedule addSchedule = new AddSchedule();
        workflow.AddPostCondition(addSchedule);

        ApplyPresenter presenter = new ApplyPresenter(applyScheduleView, workflow);
        this.applyScheduleView.Presenter = presenter;
        presenter.InitView();
    }

    private void ButtonSumbit_Click(object sender, EventArgs e)
    {

    }
}
